/*******************************************************************************
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *  
 * Copyright (c) 2011 Michael Chan.
 ******************************************************************************/
package com.google.code.solrdimension.core.dimensions;

/**
 * DimensionValue holds the info required for displaying facet values, and
 * parameter necessary for generating an URL for selecting the Facet.
 * 
 * @author mhc
 *
 */
public class DimensionValue implements Comparable<DimensionValue>{
    
    
    private long count;
    
    private String filterQuery;
    
    private String facetPrefixQuery;
    
    private String displayName;
    
    public DimensionValue(String displayName, String filterQuery,String facetPrefixQuery,  long count){
        
        this.displayName = displayName;
        this.facetPrefixQuery = facetPrefixQuery;
        this.filterQuery = filterQuery;
        this.count = count;
        
    }

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }

    public String getFilterQuery() {
        return filterQuery;
    }

    public void setFilterQuery(String filterQuery) {
        this.filterQuery = filterQuery;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    
    public String getFacetPrefixQuery() {
        return facetPrefixQuery;
    }

    public void setFacetPrefixQuery(String facetPrefixQuery) {
        this.facetPrefixQuery = facetPrefixQuery;
    }
    
    //comparison is only for name
    
    public int compareTo(DimensionValue dimval) {
        
        return this.displayName.compareTo(dimval.getDisplayName());
    }


}
